<template>
  <div class="order-seckill-view">
    <ComplexTable :columns="columns" :list="tableList" :selection="true">
      <div class="slot-wrapper">
        <div class="operation-btn">
          <el-button type="primary" size="small">批量暂停交易</el-button>
          <el-button type="success" size="small">批量暂停上架</el-button>
        </div>
      </div>
    </ComplexTable>
  </div>
</template>

<script>
import ComplexTable from '@/components/ComplexTable'

export default {
  name: 'OrderSeckill',
  components: { ComplexTable },

  data() {
    return {
      tableList: [
        {
          id: '201683',
          author: '赜隐',
          price: '小王 18800002299',
          status: '4',
          code: 230,
          time: '1202000.00',
          down: '560',
          sale: '10',
          buy: '0',
          space: '12：45',
          goodstatus: '正常',
          call: '正常'
        }
      ]
    }
  },

  computed: {
    columns() {
      return [
        {
          label: '空间名称',
          prop: 'author',
          search: 'select',
          options: [
            {
              label: '张三',
              value: '1'
            },
            {
              label: '李四',
              value: '2'
            }
          ]
        },
        {
          label: '空间主',
          prop: 'price'
        },
        {
          label: '团队数',
          prop: 'status'
        },
        {
          label: '空间人数',
          prop: 'code'
        },
        {
          label: '昨日营业额',
          prop: 'time'
        },
        {
          label: '今日已上架商品数',
          prop: 'down'
        },
        {
          label: '昨日空间主回购',
          prop: 'sale'
        },
        {
          label: '昨日公司回购',
          prop: 'buy'
        },
        {
          label: '抢购时间',
          prop: 'buyphone'
        },
        {
          label: '交易状态',
          prop: 'pricelabel'
        },
        {
          label: '上架状态',
          prop: 'space'
        },
        {
          label: '操作',
          prop: 'operate',
          align: 'center',
          width: '300',
          fixed: 'right',
          render: (h, data) => {
            return (
              <div>
                <el-button
                  size="mini"
                  onClick={() => {
                    this.$router.push({ name: 'SeckillManage' })
                  }}
                >
                  管理
                </el-button>
                <el-button size="mini">暂停交易</el-button>
                <el-button size="mini">暂停上架</el-button>
              </div>
            )
          }
        }
      ]
    }
  },

  beforeMount() {
    console.log('asd')
  }
}
</script>

<style lang="scss">
@import './index';
</style>
